-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a protocol test for endpoints that contain path prefixes #845
Conversation
@@ -86,5 +86,8 @@ service RestJson { | |||
// @endpoint and @hostLabel trait tests | |||
EndpointOperation, | |||
EndpointWithHostLabelOperation, | |||
|
|||
// custom endpoints with paths | |||
PathOperation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PathOperation
reads like an operation with path parameters. Maybe EndpointWithPathOperation? Or if that implies use of @endpoint trait like the couple of tests above, maybe HostWithPathOperation?
Custom endpoints supplied by users can have paths""", | ||
protocol: restJson1, | ||
method: "GET", | ||
uri: "/custom/PathOperation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uri: "/custom/PathOperation", | |
uri: "/custom/HostWithPathOperation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that was a bad miss.
- The host / endpoint provided to the client, not including the path or | ||
scheme (for example, "example.com"). | ||
- The host / endpoint provided to the client (for example, "example.com"). | ||
This will generally not include a path unless it is a non-modeled prefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you flip this sentence around and say when it would a path, an example of what it looks like, and how it works with paths in operations? It's important to state that here since we aren't using the same URI resolution logic defined in RFC 3986.
For example:
host
MAY contain a path to indicate a base path from which each operation in the service is appended to. For example, given ahost
ofexample.com/foo/bar
and an operation path of/MyOperation
, the resolved host of the operation isexample.com
and the resolved path is/foo/bar/MyOperation
.
5993114
to
fdc7ad0
Compare
Sometimes, a service will have a path prefix that is not modeled. This adds a test that ensures REST-JSON clients will properly take that path into account.
Description of changes:
Sometimes, a service will have a path prefix that is not modeled. This adds a
test that ensures REST-JSON clients will properly take that path into account.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.